﻿using System;
using System.ServiceModel;

using System.Resources;
using System.Reflection;
using System.Globalization;

namespace AllMyMoney.ConsoleServer
{
    public sealed class Application
    {
        static public int Main(string[] args)
        {
            /*
            Console.WriteLine("Current culture is:{0}", System.Threading.Thread.CurrentThread.CurrentUICulture);
            System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo("ru-RU");
            Console.WriteLine("New culture is:{0}", System.Threading.Thread.CurrentThread.CurrentUICulture);

            ResourceManager rm = new ResourceManager("ConsoleServer", Assembly.GetExecutingAssembly());
            Console.WriteLine("Language={0}", rm.GetString("language"));
            */

            Type serviceType = typeof(AllMyMoney.WCFService.UserManagement);
            using (ServiceHost host = new ServiceHost(serviceType))
            {
                host.Open();
                Console.WriteLine("Service has started, press ENTER to stop.");
                Console.ReadLine();
            }
            return 0;
        }
    }
}